package com.xbongbong.pro.weblist.pojo;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.field.ItemPoJo;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/2/18 17:05
 * @since v1.0
 */
@Getter
@Setter
public class SpecialListFieldPojo {
    /**
     * 字段
     */
    private String attr;
    /**
     * 字段名称
     */
    private String attrName;
    /**
     * 字段类型
     */
    private Integer fieldType;
    /**
     * 是否多选
     */
    private Integer multiple;
    /**
     * 提示语
     */
    private String placeholder;
    /**
     * 下拉选项
     */
    private List<ItemPoJo> items;
    /**
     * 默认值
     */
    private String defaultValue;
    /**
     * 是否可在筛选的时候搜索
     */
    private Integer filterable;

    /**
     * 是否可编辑，开关字段要这个，原因我也不懂
     */
    private Integer editable;

    private JSONObject filterContent;

    public SpecialListFieldPojo() {

    }

    public SpecialListFieldPojo(String attr, String attrName, Integer fieldType, Integer multiple, String placeholder, List<ItemPoJo> items) {
        this.attr = attr;
        this.attrName = attrName;
        this.fieldType = fieldType;
        this.multiple = multiple;
        this.placeholder = placeholder;
        this.items = items;
    }

    public SpecialListFieldPojo(String attr, String attrName, Integer fieldType, String placeholder) {
        this.attr = attr;
        this.attrName = attrName;
        this.fieldType = fieldType;
        this.placeholder = placeholder;
    }
}
